<?xml version="1.0"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">


<f:view contentType="text/html" encoding="UTF-8">

	<f:event listener="#{sessionBean.loadUser}"
		type="javax.faces.event.PreRenderComponentEvent" />

	<h:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<title>Nex Soluções</title>

		<link rel="shortcut icon" type="image/x-icon"
			href="${facesContext.externalContext.requestContextPath}/paginas/recursos/imagens/layout/favicon.ico" />

		<link rel="stylesheet" type="text/css"
			href="${facesContext.externalContext.requestContextPath}/paginas/recursos/css/formulario.css" />
		<link rel="stylesheet" type="text/css"
			href="${facesContext.externalContext.requestContextPath}/paginas/recursos/css/stylo.css" />
		<link rel="stylesheet" type="text/css"
			href="${facesContext.externalContext.requestContextPath}/paginas/recursos/css/menu.css" />
		<link rel="stylesheet" type="text/css"
			href="${facesContext.externalContext.requestContextPath}/paginas/recursos/css/cash.css" />
		<script type="text/javascript"
			src="/sunrise/paginas/recursos/js/jquery.meio.mask.js"
			charset="utf-8"></script>
		<script type="text/javascript"
			src="/sunrise/paginas/recursos/js/masks.js" charset="utf-8"></script>
		<script type="text/javascript"
			src="/sunrise/paginas/recursos/js/sunrise.js" charset="utf-8"></script>
		<!-- <script type="text/javascript"
					src="http://connect.facebook.net/pt_BR/all.js" charset="utf-8"></script> -->


		<ui:insert name="head">
		</ui:insert>
	</h:head>

	<h:body styleClass="panelHeader">
		<div id="wrapper">
			<div id="topo">
				<div class="top-data-left">
					<p:graphicImage value="/paginas/recursos/imagens/layout/i-2aa.png"
						title="Home" />

				</div>
				<div class="top-menu-data"></div>
				<div class="top-data-right">
					<form action="/sunrise/logout" method="post">
						<span class="name-user"> <p:graphicImage
								onclick="popupLogin.show();"
								value="/paginas/recursos/imagens/layout/ui-user-icon.png"
								title="Avatar">
							</p:graphicImage> <ui:include src="/paginas/loginPopup.xhtml" /> Olá, <p:outputLabel
								value="#{sessionBean.usuarioLogado.primeiroNome}"
								id="nomePerfil" /> <p:outputLabel value="! " /> <p:graphicImage
								onclick="notificacoesUsuario.show();"
								value="/paginas/recursos/imagens/layout/bell.png"
								title="Notificações" /> <input type="submit"
							class="botaoLogout" value="" />
						</span>
					</form>


				</div>

			</div>

			<header>

				<p:dialog id="novasNotificacoes" widgetVar="notificacoesUsuario"
					width="800" height="340" maximizable="true"
					style="max-width: 800px; max-height: 600px;" modal="true"
					closeOnEscape="true" header="#{rsc.label_novasNotificacoes}"
					showEffect="clip" hideEffect="clip">
					<h:form id="notificacoesUsuarioForm" prependId="false">

						<p:accordionPanel activeIndex="-1" dynamic="true"
							value="#{sessionBean.notificacoes}" var="status">
							<p:tab title="#{status.notificacao.nome}">
								<p:scrollPanel style="max-width:800px; max-height:600px">
									<h:panelGrid columns="1" cellpadding="10">
										<h:outputText value="#{status.notificacao.descricao}"
											escape="false" />
									</h:panelGrid>
								</p:scrollPanel>
							</p:tab>
						</p:accordionPanel>

						<h:panelGrid columns="1" cellpadding="10" style="align: center;">
							<p:commandLink action="listarNotificacao" ajax="false"
								oncomplete="notificacoesUsuario.close();" process="@this">
								<h:outputText value="#{rsc.label_todasNotificacoes}"
									escape="false" />
							</p:commandLink>

						</h:panelGrid>

					</h:form>
				</p:dialog>


				<p:growl id="growl" showDetail="false" life="6000" redisplay="false" />
				<p:ajaxStatus
					style="width:64px;height:64px;position:fixed;right:5px;bottom:5px">
					<f:facet name="start">
						<h:graphicImage value="/paginas/recursos/imagens/ajaxloading.gif" />
					</f:facet>

					<f:facet name="complete">
						<p:outputLabel value="" />
					</f:facet>

				</p:ajaxStatus>
			</header>

			<section>

				<h:form prependId="false">
					<ui:include src="/paginas/menu.xhtml" />
				</h:form>

				<!-- CORPO CENTRAL -->
				<ui:insert name="corpoForm">
				</ui:insert>


			</section>


			<footer>
				<div class="slogan">
					<h2>Sistema de Gestão Integrada</h2>
					Todos os direitos reservados Copyright 2013
				</div>

				<div class="trademark">
					<h:graphicImage value="/paginas/recursos/imagens/layout/i-1a.png"
						title="Nex Soluções" />
				</div>

			</footer>

			<!--NÃO REMOVER ESSA DIV -->
			<div class="clear"></div>

		</div>
	</h:body>
</f:view>
</html>